home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / printing / scriptable print simpletext / scriptableprinting.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-28  |  1.6 KB  |  73 lines

  1. /*
  2. **    File:        ScriptablePrinting.h
  3. **
  4. **    Functions defined in Technote 11xx
  5. **
  6. ** Copyright 1999 Apple Computer. All rights reserved.
  7. **
  8. **    You may incorporate this sample code into your applications without
  9. **    restriction, though the sample code has been provided "AS IS" and the
  10. **    responsibility for its operation is 100% yours.  However, what you are
  11. **    not permitted to do is to redistribute the source as "DSC Sample Code"
  12. **    after having made changes. If you're going to re-distribute the source,
  13. **    we require that you make it clear in the source that the code was
  14. **    descended from Apple Sample Code, but that you've made changes.
  15. */
  16.  
  17. #ifndef __SCRIPTABLEPRINTING__
  18. #define __SCRIPTABLEPRINTING__
  19.  
  20. #ifndef __PRINTING__
  21. #include <Printing.h>
  22. #endif
  23.  
  24. #ifndef __PRINTING__
  25. #include <Printing.h>
  26. #endif
  27.  
  28. #ifndef __APPLEEVENTS__
  29. #include <AppleEvents.h>
  30. #endif
  31.  
  32. #include "PrintAETypes.h"
  33.  
  34. #if PRAGMA_ONCE
  35. #pragma once
  36. #endif
  37.  
  38. #ifdef __cplusplus
  39. extern "C" {
  40. #endif
  41.  
  42. #if PRAGMA_STRUCT_ALIGN
  43.     #pragma options align=mac68k
  44. #elif PRAGMA_STRUCT_PACKPUSH
  45.     #pragma pack(push, 2)
  46. #elif PRAGMA_STRUCT_PACK
  47.     #pragma pack(2)
  48. #endif
  49.  
  50. OSStatus getPrintRecordFromEvent(const AppleEvent *inAppleEvent,
  51.                                 THPrint        *hPrintP);
  52.  
  53. OSStatus getPrintJobPrintRec(THPrint docPrintRec,
  54.                             THPrint settingsPrintRec,
  55.                             THPrint *jobPrintRecP);
  56.  
  57. OSStatus getPrintJobShowDialog(const AppleEvent *inAppleEvent,
  58.                                 Boolean    *showDialog);
  59.  
  60. #if PRAGMA_STRUCT_ALIGN
  61.     #pragma options align=reset
  62. #elif PRAGMA_STRUCT_PACKPUSH
  63.     #pragma pack(pop)
  64. #elif PRAGMA_STRUCT_PACK
  65.     #pragma pack()
  66. #endif
  67.  
  68. #ifdef __cplusplus
  69. }
  70. #endif
  71.  
  72. #endif /* __SCRIPTABLEPRINTING__ */
  73.